package com.mall.service.impl;

import com.github.pagehelper.PageInfo;
import com.mall.bean.ItemGoods;
import com.mall.bean.ItemGoodsExample;
import com.mall.dao.ItemGoodsMapper;
import com.mall.service.ItemGoodsService;
//import javafx.scene.transform.Scale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lwd1513
 * @date 2022-04-25 11 32
 * discription
 */
@Service
public class ItemGoodsServiceImpl implements ItemGoodsService {

    @Autowired
    private ItemGoodsMapper itemGoodsMapper;

    @Override
    public int insert(ItemGoods itemGoods) {
        return 0;
    }

    @Override
    public List<ItemGoods> queryData(ItemGoods itemGoods) {
        return null;
    }

    @Override
    public int update(ItemGoods itemGoods) {
        return 0;
    }

    @Override
    public int deleteById(String id) {
        return 0;
    }

    @Override
    public ItemGoods queryDataById(String id) {
        return null;
    }

    @Override
    public PageInfo<ItemGoods> queryDataByPage(int currentPage, int pageSize, ItemGoods itemGoods) {
        return null;
    }

    @Override
    public List<ItemGoods> getMoreGoodsByCatId(String catId) {
        ItemGoodsExample example = new ItemGoodsExample();
        ItemGoodsExample.Criteria criteria = example.createCriteria();
        criteria.andCat_idEqualTo(Integer.parseInt(catId));
        List<ItemGoods> itemGoods = itemGoodsMapper.selectByExample(example);
        return itemGoods;
    }
}
